package com.rc.saas.mini.charge;

import com.rc.saas.mini.common.base.TResponse;
import com.rc.saas.mini.common.config.UpYunConfig;
import com.rc.saas.mini.model.elec.ElecGun;
import com.rc.saas.mini.model.elec.ElecStation;
import com.rc.saas.mini.model.member.MemberAccount;
import com.rc.saas.mini.model.member.MemberInfo;
import com.rc.saas.mini.model.order.OrderInfo;
import com.rc.saas.mini.vo.charge.CommandStartReq;
import com.rc.saas.mini.vo.charge.CommandStopReq;
import com.rc.saas.mini.vo.elec.ElecStationOutVo;
import com.rc.saas.mini.vo.hlhtcec2.StartChargeResult;
import com.rc.saas.mini.vo.hlhtcec2.StopChargeResult;
import com.rc.saas.mini.vo.hlhtcec2.WxEquipChargeStatusResult;

/**
 * @author wangzhengwei
 * @create 2021/12/21
 * 平台作为设备方(包括瑞晨在内的SAAS运营商)的充电服务接口
 */
public interface ChargeService {


    /**
     * 根据枪号或二维码获取详情
     */
    TResponse query_gun_detail(MemberInfo memberInfo, ElecStation elecStation, ElecGun elecGun,
                               String hlhtTenantCode, String hlhtOperatorId, String gunNo, String qrCode);


    /**
     * 充电前用户余额检查
     */
    TResponse checkStartMemberAccount(MemberInfo memberInfo, MemberAccount memberAccount,
                                      String hlhtTenantCode, String hlhtOperatorId, String accountType);

    /**
     * 启动充电,如果成功StartChargeSeqStat需回复1（启动中）
     */
    StartChargeResult assembleStartChargeResult(CommandStartReq commandStartReq);

    /**
     * 查询充电状态,充电过程中调用
     */
    WxEquipChargeStatusResult assembleEquipChargeStatusResult(CommandStartReq commandStartReq);

    /**
     * 请求停止充电,如果成功StartChargeSeqStat需回复3（停止中）
     */
    StopChargeResult assembleStopChargeResult(CommandStopReq commandStopReq);

    /**
     * 通过桩群，订单，和枪编号获取桩群出场信息
     */
    ElecStationOutVo assembleStationOutData(ElecStation elecStation, OrderInfo orderInfo, ElecGun elecGun, UpYunConfig upYunConfig);

    /**
     * 读取充电中枪soc
     */
    String getCurrDataSoc(ElecGun gun, String tenantCode);

    /**
     * 剩余时间
     * @param orderNum
     * @return
     */
    String getRemainChargingTime(String orderNum);
    /**
     * 最高温度
     * @param orderNum
     * @return
     */
    public String getTemperatureHigh(String orderNum);
}
